package org.jmh.gift.controller;

import org.jmh.gift.dto.PcWebPayDTO;
import org.jmh.gift.service.IPayService;
import org.jmh.gift.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/pay")
public class PayController {

    @Autowired
    private IPayService payService;

    /**
     * pc网站支付
     * @return
     */
    @PostMapping("/pcWeb")
    public AjaxResult pcPay(@RequestBody PcWebPayDTO dto)throws Exception{
        String result = payService.Pay(dto);
        return AjaxResult.success(result);
    }
}
